import request from "@/utils/request";



export function getDevicesTree() {
  return request({
    url: '/acAnDevice/getDevicesTree',
    method: 'get',
  })
}

export function getCurrentApk() {
  return request({
    url: '/sysApkVersion/getCurrentApk',
    method: 'get',

  })
}

export function atxInit(data) {
  return request({
    url: '/acAnDevice/atxInit',
    method: 'post',
    data
  })
}


export function getAnDeviceListPage(data) {
  return request({
    url: '/acAnDevice/selectAll',
    method: 'get',
    params: { size:data.size,
      current:data.current
    }
  })
}


export function addAnDevice(data) {
  return request({
    url: '/acAnDevice/insert',
    method: 'post',
    data
  })
}

export function updAnDevice(data) {
  return request({
    url: '/acAnDevice/update',
    method: 'put',
    data
  })
}
export function delAnDevice(data) {
  return request({
    url: '/acAnDevice/delete',
    method: 'delete',
    params: { idList:data
    }
  })
}


export function getAnDeviceById(data) {
  return request({
    url: '/acAnDevice/selectOne/'+data,
    method: 'get'
  })
}
